<!DOCTYPE HTML>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>审计机构</title>
</head>
<style>
	a{color: #0066cc;}
	a:hover{
		color: orangered;
	}
</style>
<body class="pos-r">
<div>
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 管理 <span class="c-gray en">&gt;</span> 审计内外部制度发布 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
	<div class="page-container">
		<div class="mt-20">
			<table class="table table-border table-bordered table-bg table-hover table-sort">
				<thead>
					<tr class="text-c">
						<button class="btn" onclick="shangchuan_add('附件上传','fujian-add','770','500')" style="margin-bottom: 6px;">上传</button>
					</tr>
					<tr class="text-c">
						<th width="100">知识要点</th>
						<th width="100">资料名称</th>
						<th width="100">发布时间</th>
						<th width="100">状态</th>
						<th width="100">操作</th>
					</tr>
				</thead>
				<tbody>
					<tr class="text-c va-m" th:each="know:${knows}">
						<td th:text="${know.keypoints}"></td>
						<td th:text="${know.realFileName}"></td>
						<td th:text="${know.retime}"></td>
						<td th:if="${know.status=='1'}" id="status">正常</td>
						<td th:if="${know.status=='0'}" id="status">异常</td>
						<td>
							<a th:onclick="'javascript:removeFile(\''+${know.id}+'\');'">删除</a>&nbsp;
							<a th:onclick="'javascript:downloadFile(\''+${know.id}+'\');'">下载</a>
						</td>
					</tr>
				</tbody>
			</table>
		</div>
	</div>
</div>

<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="static/h-ui/js/H-ui.min.js"></script> 
<script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript">
function shangchuan_add(title,url,w,h){
	layer_show(title,url,w,h);
}
$('.table-sort').dataTable({
    "bFilter": true,//过滤功能
    "bPaginate": true,//翻页信息
    "bInfo": true,//数量信息
    "bStateSave": true,//状态保存
    "aoColumnDefs": [
        {"orderable":false,"aTargets":[0,1,2,3,4]},// 制定列不参与排序
    ]
});

function removeFile(id){
    var t = window.confirm("确认要删除吗");
	if (t){
        $.ajax({
            type:"POST",
            url:"/removeFile",
            traditional:true,
            data:{id:id},
            success:function(data){
                parent.layer.msg("删除成功",{icon:1,time:2000})
                window.location.reload();
            },
            error : function(e) {
                alert("ERROR: ", e);
            }
        });
	}
}

//下载文件
function downloadFile(id) {
	// if ($(this).text()){
    //     parent.layer.msg("文件异常",{icon:7,time:2000})
	// 	return false;
	// }
    window.open("/downloadFile?id=" + id);
}
</script>
</body>
</html>